package com.kashi.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Card extends Goods{
    private Double askPrice;
    private Double salePrice;
    private Boolean isSent;
    private Boolean isReceived;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public void setFromGoods(Goods goods) {
        // 根据 Goods 实例的属性值设置 Card 实例的对应属性值
        this.setId(goods.getId());
        this.setImage(goods.getImage());
        this.setName(goods.getName());
        // 其他属性的设置
    }
}
